<style>
  .results1 {
  float: left;
  width: 45%;
  margin-top: 5px;
  margin-bottom: 5px;
  margin-left: 5%;
  }
  .results2 {
  float: left;
  width: 40%;
  margin-top: 5px;
  margin-bottom: 5px;
  margin-left: 5%;
  margin-right: 5%;
  }
  .results3 {
  float: left;
  width: 90%;
  margin-top: 5px;
  margin-bottom: 5px;
  margin-left: 5%;
  margin-right: 5%;
  }
</style>
<script>
  function open_curve(name, fields) {
  	window.open("/cs/statistics/?name=" + name
  					+ "&term=hourly&delta=0&fields=" + fields, "",
  					"width=800,height=700,scrollbars=yes,resizeable=no,left=50,top=50");
  }
  
  function open_distribution(ratio) {
  	window.open("/cs/statistics/?ratio=" + ratio + "&delta=0", "",
  					"width=800,height=800,scrollbars=no,resizeable=no,left=50,top=50");
  }
</script>
<link rel="stylesheet" href="https://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
<script src="https://code.jquery.com/jquery-1.9.1.js"></script>
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<script type="text/javascript">
  $(document).ready(
  	function() {
  		var oDate = {
  			from : '',
  			to : ''
  		};
  
  		var dates = $("#from, #to ").datepicker(
  			{
  				prevText : '이전 달',
  				nextText : '다음 달',
  				monthNames : [ '1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월' ],
  				monthNamesShort : [ '1월', '2월', '3월', '4월', '5월', '6월', '7월', '8월', '9월', '10월', '11월', '12월' ],
  				dayNames : [ '일', '월', '화', '수', '목', '금', '토' ],
  				dayNamesShort : [ '일', '월', '화', '수', '목', '금', '토' ],
  				dayNamesMin : [ '일', '월', '화', '수', '목', '금', '토' ],
  				dateFormat : 'yy-mm-dd',
  				showMonthAfterYear : true,
  				yearSuffix : '년',
  				onSelect : function(selectedDate) {
  					oDate[this.id] = selectedDate;
  					var option = this.id == "from" ? "minDate" : "maxDate", 
  					instance = $(this).data("datepicker"), 
  					date = $.datepicker.parseDate(instance.settings.dateFormat || $.datepicker._defaults.dateFormat, selectedDate, instance.settings);
  					dates.not(this).datepicker("option", option, date);
  				}
  			}
  		);
  	}
  );
</script>
{% include '/templates/cs_header.html' %}
<!-- Container -->
<div id="container1">
<!-- Content -->
<div id="content1" class="flex">
  <div>
    <h3>기간 별 통계</h3>
    <div>
      <form id="list-form" action="#" method="post">
        <div style="margin-top: 20px; margin-left: 60px;">
          <b>조회기간: </b> <input id="from" name="fromDay" style="width: 90px;" type="text" value="{{fromDay}}" />~ <input id="to" name="toDay" style="width: 90px;" type="text" value="{{toDay}}" /> <input type="image" id="" name="_search" value="조회" style="cursor: pointer;" src="/static/img/search.png" />
          <!-- <input type="submit" id="" name="_export" value="export to..." style="cursor:pointer;" /> -->
        </div>
        <div class="module1" id="changelist">
          <br />
          <div class="results1">
            <h3>[유저]</h3>
            <table class="result_list">
              <thead>
                <tr>
                  <th class="sortable" rowspan="2" scope="col" style="width: 120px;">-</th>
                  <th class="sortable" colspan="5" scope="col" style="width: 500px;">앱스토어</th>
                  <th class="sortable" colspan="5" scope="col" style="width: 500px;">구글 플레이</th>
                </tr>
                <tr>
                  {% for i in range(0,5) %}
                  <th class="sortable" scope="col">{{i}}</th>
                  {% endfor %}
                  {% for i in range(0,5) %}
                  <th class="sortable" scope="col">{{i}}</th>
                  {% endfor %}
                </tr>
              </thead>
              <thead>
                <tr>
                  <th class="sortable" scope="col">가입자</th>
                  <td class="row0" colspan="5"><a href="#" onclick="open_curve('가입자','i_register')">{{statistics.i_register}}</a></td>
                  <td class="row0" colspan="5"><a href="#" onclick="open_curve('가입자', 'p_register')">{{statistics.p_register}}</a></td>
                </tr>
                <tr>
                  <th class="sortable" scope="col">
                    <div class="text">DAU</div>
                  </th>
                  <td class="row1" colspan="5"><a href="#" onclick="open_curve('DAU', 'i_dau')">{{statistics.i_dau}}</a></td>
                  <td class="row1" colspan="5"><a href="#" onclick="open_curve('DAU', 'p_dau')">{{statistics.p_dau}}</a></td>
                </tr>
                <tr>
                  <th class="sortable" scope="col">
                    <div class="text">로그인</div>
                  </th>
                  <td class="row0" colspan="5"><a href="#" onclick="open_curve('로그인', 'i_login')">{{statistics.i_login}}</a></td>
                  <td class="row0" colspan="5"><a href="#" onclick="open_curve('로그인', 'p_login')">{{statistics.p_login}}</a></td>
                </tr>
                <tr>
                  <th class="sortable" scope="col">
                    <div class="text">초대</div>
                  </th>
                  <td class="row1" colspan="5"><a href="#" onclick="open_curve('초대', 'i_invite')">{{statistics.i_invite}}</a></td>
                  <td class="row1" colspan="5"><a href="#" onclick="open_curve('초대', 'p_invite')">{{statistics.p_invite}}</a></td>
                </tr>
                <tr>
                  <th class="sortable" scope="col">
                    <div class="text">자랑하기</div>
                  </th>
                  <td class="row0" colspan="5"><a href="#" onclick="open_curve('자랑하기', 'i_boast')">{{statistics.i_boast}}</a></td>
                  <td class="row0" colspan="5"><a href="#" onclick="open_curve('자랑하기', 'p_boast')">{{statistics.p_boast}}</a></td>
                </tr>
                <tr>
                  <th class="sortable" scope="col">
                    <div class="text">당근보내기</div>
                  </th>
                  <td class="row1" colspan="5"><a href="#" onclick="open_curve('당근보내기', 'i_send_bout')">{{statistics.i_send_bout}}</a></td>
                  <td class="row1" colspan="5"><a href="#" onclick="open_curve('당근보내기', 'p_send_bout')">{{statistics.p_send_bout}}</a></td>
                </tr>
                <tr>
                  <th class="sortable" scope="col">
                    <div class="text">당근요청</div>
                  </th>
                  <td class="row0" colspan="5"><a href="#" onclick="open_curve('당근요청', 'i_req_bout')">{{statistics.i_req_bout}}</a></td>
                  <td class="row0" colspan="5"><a href="#" onclick="open_curve('당근요청', 'p_req_bout')">{{statistics.p_req_bout}}</a></td>
                </tr>
                <tr>
                  <th class="sortable" scope="col">
                    <div class="text">리뷰작성</div>
                  </th>
                  <td class="row1" colspan="5"><a href="#" onclick="open_curve('리뷰작성', 'i_review')">{{statistics.i_review}}</a></td>
                  <td class="row1" colspan="5"><a href="#" onclick="open_curve('리뷰작성', 'p_review')">{{statistics.p_review}}</a></td>
                </tr>
                <tr>
                  <th class="sortable" scope="col">
                    <div class="text">회원탈퇴</div>
                  </th>
                  <td class="row0" colspan="5"><a href="#" onclick="open_curve('회원탈퇴', 'i_unregister')">{{statistics.i_unregister}}</a></td>
                  <td class="row0" colspan="5"><a href="#" onclick="open_curve('회원탈퇴', 'p_unregister')">{{statistics.p_unregister}}</a></td>
                </tr>
                <tr>
                  <th class="sortable" scope="col">
                    <div class="text">게임 수</div>
                  </th>
                  {% for i in range(statistics.i_game_counts|length) %}
                  <td class="row1"><a href="#" onclick="open_curve('게임 수 ID:{{i+1}}', 'i_game_counts,{{i}}')">{{statistics.i_game_counts[i]}}</a></td>
                  {% endfor %}
                   {% for i in range(statistics.p_game_counts|length) %}
                  <td class="row1"><a href="#" onclick="open_curve('게임 수 ID:{{i+1}}', 'p_game_counts,{{i}}')">{{statistics.p_game_counts[i]}}</a></td>
                  {% endfor %}
                </tr>
              </thead>
            </table>
            <div>
              <input type="submit" onclick="open_distribution('gameplays')" value="게임횟수분포" style="cursor: pointer;" />
            </div>
          </div>
          <div class="results3">
            <h3>[상품-구글 플래이]</h3>
            <table class="result_list">
              <thead>
                <tr>
                  <th class="sortable" scope="col" colspan="15">구글 플레이</th>
                </tr>
                <tr>
                  <th class="sortable" scope="col" style="width: 100px;"></th>
                  <th class="sortable" scope="col" style="width: 230px;"></th>
                  {% for i in range(12) %}
                  <th class="sortable" scope="col" style="width: 100px;">{{i+1}}</th>
                  {% endfor %}
                  <th class="sortable" scope="col" style="width: 120px;">합계</th>
                </tr>
                <tr>
                  <td scope="col" rowspan="4" style="vertical-align: middle;"><b>통화</b></td>
                  <th class="sortable" scope="col">복숭아구매(KRW)</th>
                  {% for i in range(statistics.p_buy_cashes|length) %}
                  <td class="row0"><a href="#" onclick="open_curve('복숭아구매(KRW) ID:{{i+1}})', 'p_buy_cashes,{{i}}')">₩{{statistics.p_buy_cashes[i]}}</a></td>
                  {% endfor %}
                  <td colspan="{{12-statistics.p_buy_cashes|length}}" style="background-color: #E0E0E0;"></td>
                  <td class="row0"><a href="#" onclick="open_curve('복숭아구매(KRW)', 'p_buy_cashes,-1')">₩{{statistics.p_buy_cashes|sum()}}</a></td>
                </tr>
                <tr>
                  <th class="sortable" scope="col">복숭아선물(KRW)</th>
                  {% for i in range(statistics.p_present_cashes|length) %}
                  <td class="row1"><a href="#" onclick="open_curve('복숭아선물(KRW) ID:{{i+1}})', 'p_present_cashes,{{i}}')">₩{{statistics.p_present_cashes[i]}}</a></td>
                  {% endfor %}
                  <td colspan="{{12-statistics.p_present_cashes|length}}" style="background-color: #E0E0E0;"></td>
                  <td class="row1"><a href="#" onclick="open_curve('복숭아선물(KRW)', 'p_present_cashes,-1')">₩{{statistics.p_present_cashes|sum()}}</a></td>
                </tr>
                <tr>
                  <th class="sortable" scope="col">코인구매(횟수)</th>
                  {% for i in range(statistics.p_buy_coins|length) %}
                  <td class="row0"><a href="#" onclick="open_curve('코인구매 ID:{{i+1}}', 'p_buy_coins,{{i}}')">{{statistics.p_buy_coins[i]}}</a></td>
                  {% endfor %}
                  <td colspan="{{12-statistics.p_buy_coins|length}}" style="background-color: #E0E0E0;"></td>
                  <td class="row0"><a href="#" onclick="open_curve('코인구매', 'p_buy_coins,-1')">{{statistics.p_buy_coins|sum()}}</a></td>
                </tr>
                <tr>
                  <th class="sortable" scope="col">당근구매(횟수)</th>
                  {% for i in range(statistics.p_buy_bouts|length) %}
                  <td class="row1"><a href="#" onclick="open_curve('당근구매 ID:{{i+1}}', 'p_buy_bouts,{{i}}')">{{statistics.p_buy_bouts[i]}}</a></td>
                  {% endfor %}
                  <td colspan="{{12-statistics.p_buy_bouts|length}}" style="background-color: #E0E0E0;"></td>
                  <td class="row1"><a href="#" onclick="open_curve('당근구매', 'p_buy_bouts,-1')">{{statistics.p_buy_bouts|sum()}}</a></td>
                </tr>
                <tr>
                  <td scope="col" rowspan="6" style="vertical-align: middle;"><b>캐릭터</b></td>
                  <th class="sortable" scope="col">
                    <div class="text">캐릭터구매(횟수)</div>
                  </th>
                  {% for i in range(statistics.p_buy_chars|length) %}
                  <td class="row0"><a href="#" onclick="open_curve('캐릭터구매 ID:{{i+1}}', 'p_buy_chars,{{i}}')">{{statistics.p_buy_chars[i]}}</a></td>
                  {% endfor %}
                  <td colspan="{{12-statistics.p_buy_chars|length}}" style="background-color: #E0E0E0;"></td>
                  <td class="row0"><a href="#" onclick="open_curve('캐릭터구매', 'p_buy_chars,-1')">{{statistics.p_buy_chars|sum()}}</a></td>
                </tr>
                <tr>
                  <th class="sortable" scope="col">
                    <div class="text">캐릭터입양(횟수)</div>
                  </th>
                  {% for i in range(statistics.p_adopt_chars|length) %}
                  <td class="row1"><a href="#" onclick="open_curve('캐릭터입양 ID:{{i+1}}', 'p_adopt_chars,{{i}}')">{{statistics.p_adopt_chars[i]}}</a></td>
                  {% endfor %}
                  <td colspan="{{12-statistics.p_adopt_chars|length}}" style="background-color: #E0E0E0;"></td>
                  <td class="row1"><a href="#" onclick="open_curve('캐릭터입양', 'p_adopt_chars,-1')">{{statistics.p_adopt_chars|sum()}}</a></td>
                </tr>
                <tr>
                  <th class="sortable" scope="col">
                    <div class="text">호감도행동(횟수)</div>
                  </th>
                  {% for i in range(statistics.p_feed_self_chars|length) %}
                  <td class="row0"><a href="#" onclick="open_curve('호감도행동 ID:{{i+1}}', 'p_feed_self_chars,{{i}}')">{{statistics.p_feed_self_chars[i]}}</a></td>
                  {% endfor %}
                  <td colspan="{{12-statistics.p_feed_self_chars|length}}" style="background-color: #E0E0E0;"></td>
                  <td class="row0"><a href="#" onclick="open_curve('호감도행동', 'p_feed_self_chars,-1')">{{statistics.p_feed_self_chars|sum()}}</a></td>
                </tr>
                <tr>
                  <th class="sortable" scope="col">
                    <div class="text">호감도행동-친구(횟수)</div>
                  </th>
                  {% for i in range(statistics.p_feed_friend_chars|length) %}
                  <td class="row1"><a href="#" onclick="open_curve('호감도행동-친구 ID:{{i+1}}', 'p_feed_friend_chars,{{i}}')">{{statistics.p_feed_friend_chars[i]}}</a></td>
                  {% endfor %}
                  <td colspan="{{12-statistics.p_feed_friend_chars|length}}" style="background-color: #E0E0E0;"></td>
                  <td class="row1"><a href="#" onclick="open_curve('호감도행동-친구', 'p_feed_friend_chars,-1')">{{statistics.p_feed_friend_chars|sum()}}</a></td>
                </tr>
                <tr>
                  <th class="sortable" scope="col">
                    <div class="text">호감도버프(횟수)</div>
                  </th>
                  {% for i in range(statistics.p_buff|length) %}
                  <td class="row0"><a href="#" onclick="open_curve('호감도행동 ID:{{i+1}}', 'p_buff,{{i}}')">{{statistics.p_buff[i]}}</a></td>
                  {% endfor %}
                  <td colspan="{{12-statistics.p_buff|length}}" style="background-color: #E0E0E0;"></td>
                  <td class="row0"><a href="#" onclick="open_curve('호감도행동', 'p_buff,-1')">{{statistics.p_buff|sum()}}</a></td>
                </tr>
                <tr>
                  <th class="sortable" scope="col">
                    <div class="text">쿨타임초기화(횟수)</div>
                  </th>
                  <td class="row1"><a href="#" onclick="open_curve('쿨타임초기화', 'p_clear_cooltime')">{{statistics.p_clear_cooltime}}</a></td>
                  <td colspan="{{12-1}}" style="background-color: #E0E0E0;"></td>
                  <td class="row1"><a href="#" onclick="open_curve('쿨타임초기화', 'p_clear_cooltime')">{{statistics.p_clear_cooltime}}</a></td>
                </tr>
                <tr>
                  <td scope="col" rowspan="4" style="vertical-align: middle;"><b>기타</b></td>
                  <th class="sortable" scope="col">
                    <div class="text">아이템 가차(횟수)</div>
                  </th>
                  <td class="row0"><a href="#" onclick="open_curve('아이템 가차', 'p_gacha_item')">{{statistics.p_gacha_item}}</a></td>
                  <td colspan="{{12-1}}" style="background-color: #E0E0E0;"></td>
                  <td class="row0"><a href="#" onclick="open_curve('아이템 가차', 'p_gacha_item')">{{statistics.p_gacha_item}}</a></td>
                </tr>
                <tr>
                  <th class="sortable" scope="col">
                    <div class="text">일일포인트 가차(포인트)</div>
                  </th>
                  <td class="row1"><a href="#" onclick="open_curve('일일포인트 가차', 'p_use_dpoint')">{{statistics.p_use_dpoint}}</a></td>
                  <td colspan="{{12-1}}" style="background-color: #E0E0E0;"></td>
                  <td class="row1"><a href="#" onclick="open_curve('일일포인트 가차', 'p_use_dpoint')">{{statistics.p_use_dpoint}}</a></td>
                </tr>
                <tr>
                  <th class="sortable" scope="col">
                    <div class="text">이어하기(횟수)</div>
                  </th>
                  <td class="row0"><a href="#" onclick="open_curve('이어하기', 'p_continue')">{{statistics.p_continue}}</a></td>
                  <td colspan="{{12-1}}" style="background-color: #E0E0E0;"></td>
                  <td class="row0"><a href="#" onclick="open_curve('이어하기', 'p_continue')">{{statistics.p_continue}}</a></td>
                </tr>
                <tr>
                  <th class="sortable" scope="col">
                    <div class="text">복숭아/코인/당근/캐릭터 보상</div>
                  </th>
                  {% for i in range(statistics.p_rewards|length) %}
                  <td class="row1"><a href="#" onclick="open_curve('복숭아/코인/당근/캐릭터 보상 ID:{{i+1}}', 'p_rewards,{{i}}')">{{statistics.p_rewards[i]}}</a></td>
                  {% endfor %}
                  <td colspan="{{12-statistics.p_rewards|length}}" style="background-color: #E0E0E0;"></td>
                  <td class="row1"><a href="#" onclick="open_curve('복숭아/코인/당근/캐릭터 보상', 'p_rewards,-1')">{{statistics.p_rewards|sum()}}</a></td>
                </tr>
                {% for items in statistics.p_use_items %}
                <tr>
                  {% if loop.index==1 %}
                  	<td scope="col" rowspan="{{statistics.p_use_items|length}}" style="vertical-align: middle;"><b>아이템</b></td>
                  {% endif %}
                  <th class="sortable" scope="col">
                    <div class="text">게임{{loop.index-1}} 아이템사용(횟수)</div>
                  </th>
                  <td class="row{{(loop.index-1) % 2}}"><a href="#" onclick="open_curve('게임{{loop.index-1}} 아이템사용 ID : 1', 'p_use_items[{{loop.index-1}}].item0')">{{items.item0}}</a></td>
                  <td class="row{{(loop.index-1) % 2}}"><a href="#" onclick="open_curve('게임{{loop.index-1}} 아이템사용 ID : 2', 'p_use_items[{{loop.index-1}}].item1')">{{items.item1}}</a></td>
                  <td class="row{{(loop.index-1) % 2}}"><a href="#" onclick="open_curve('게임{{loop.index-1}} 아이템사용 ID : 3', 'p_use_items[{{loop.index-1}}].item2')">{{items.item2}}</a></td>
                  <td class="row{{(loop.index-1) % 2}}"><a href="#" onclick="open_curve('게임{{loop.index-1}} 아이템사용 ID : 4', 'p_use_items[{{loop.index-1}}].item3')">{{items.item3}}</a></td>
                  <td colspan="{{12-4}}" style="background-color: #E0E0E0;"></td>
                  <td class="row{{(loop.index-1) % 2}}"><a href="#" onclick="open_curve('게임{{loop.index-1}} 아이템사용', 'p_use_items[{{loop.index-1}}],-1')">{{items.item0+items.item1+items.item2+items.item3}}</a></td>
                </tr>
                {% endfor %}
              </thead>
            </table>
          </div>
          <div class="results3">
            <h3>[상품-아이폰]</h3>
            <table class="result_list">
              <thead>
                <tr>
                  <th class="sortable" scope="col" colspan="15">아이폰</th>
                </tr>
                <tr>
                  <th class="sortable" scope="col" style="width: 100px;"></th>
                  <th class="sortable" scope="col" style="width: 230px;"></th>
                  {% for i in range(12) %}
                  <th class="sortable" scope="col" style="width: 100px;">{{i+1}}</th>
                  {% endfor %}
                  <th class="sortable" scope="col" style="width: 120px;">합계</th>
                </tr>
                <tr>
                  <td scope="col" rowspan="4" style="vertical-align: middle;"><b>통화</b></td>
                  <th class="sortable" scope="col">복숭아구매(USD)</th>
                  {% for i in range(statistics.i_buy_cashes|length) %}
                  <td class="row0"><a href="#" onclick="open_curve('복숭아구매(USD) ID:{{i+1}})', 'i_buy_cashes,{{i}}')">${{statistics.i_buy_cashes[i]}}</a></td>
                  {% endfor %}
                  <td colspan="{{12-statistics.i_buy_cashes|length}}" style="background-color: #E0E0E0;"></td>
                  <td class="row0"><a href="#" onclick="open_curve('복숭아구매(USD)', 'i_buy_cashes,-1')">${{statistics.i_buy_cashes|sum()}}</a></td>
                </tr>
                <tr>
                  <th class="sortable" scope="col">복숭아선물(USD)</th>
                  {% for i in range(statistics.i_present_cashes|length) %}
                  <td class="row1"><a href="#" onclick="open_curve('복숭아선물(USD) ID:{{i+1}})', 'i_present_cashes,{{i}}')">${{statistics.i_present_cashes[i]}}</a></td>
                  {% endfor %}
                  <td colspan="{{12-statistics.i_present_cashes|length}}" style="background-color: #E0E0E0;"></td>
                  <td class="row1"><a href="#" onclick="open_curve('복숭아선물(USD)', 'i_present_cashes,-1')">${{statistics.i_present_cashes|sum()}}</a></td>
                </tr>
                <tr>
                  <th class="sortable" scope="col">코인구매(횟수)</th>
                  {% for i in range(statistics.i_buy_coins|length) %}
                  <td class="row0"><a href="#" onclick="open_curve('코인구매 ID:{{i+1}}', 'i_buy_coins,{{i}}')">{{statistics.i_buy_coins[i]}}</a></td>
                  {% endfor %}
                  <td colspan="{{12-statistics.i_buy_coins|length}}" style="background-color: #E0E0E0;"></td>
                  <td class="row0"><a href="#" onclick="open_curve('코인구매', 'i_buy_coins,-1')">{{statistics.i_buy_coins|sum()}}</a></td>
                </tr>
                <tr>
                  <th class="sortable" scope="col">당근구매(횟수)</th>
                  {% for i in range(statistics.i_buy_bouts|length) %}
                  <td class="row1"><a href="#" onclick="open_curve('당근구매 ID:{{i+1}}', 'i_buy_bouts,{{i}}')">{{statistics.i_buy_bouts[i]}}</a></td>
                  {% endfor %}
                  <td colspan="{{12-statistics.i_buy_bouts|length}}" style="background-color: #E0E0E0;"></td>
                  <td class="row1"><a href="#" onclick="open_curve('당근구매', 'i_buy_bouts,-1')">{{statistics.i_buy_bouts|sum()}}</a></td>
                </tr>
                <tr>
                  <td scope="col" rowspan="6" style="vertical-align: middle;"><b>캐릭터</b></td>
                  <th class="sortable" scope="col">
                    <div class="text">캐릭터구매(횟수)</div>
                  </th>
                  {% for i in range(statistics.i_buy_chars|length) %}
                  <td class="row0"><a href="#" onclick="open_curve('캐릭터구매 ID:{{i+1}}', 'i_buy_chars,{{i}}')">{{statistics.i_buy_chars[i]}}</a></td>
                  {% endfor %}
                  <td colspan="{{12-statistics.i_buy_chars|length}}" style="background-color: #E0E0E0;"></td>
                  <td class="row0"><a href="#" onclick="open_curve('캐릭터구매', 'i_buy_chars,-1')">{{statistics.i_buy_chars|sum()}}</a></td>
                </tr>
                <tr>
                  <th class="sortable" scope="col">
                    <div class="text">캐릭터입양(횟수)</div>
                  </th>
                  {% for i in range(statistics.i_adopt_chars|length) %}
                  <td class="row1"><a href="#" onclick="open_curve('캐릭터입양 ID:{{i+1}}', 'i_adopt_chars,{{i}}')">{{statistics.i_adopt_chars[i]}}</a></td>
                  {% endfor %}
                  <td colspan="{{12-statistics.i_adopt_chars|length}}" style="background-color: #E0E0E0;"></td>
                  <td class="row1"><a href="#" onclick="open_curve('캐릭터입양', 'i_adopt_chars,-1')">{{statistics.i_adopt_chars|sum()}}</a></td>
                </tr>
                <tr>
                  <th class="sortable" scope="col">
                    <div class="text">호감도행동(횟수)</div>
                  </th>
                  {% for i in range(statistics.i_feed_self_chars|length) %}
                  <td class="row0"><a href="#" onclick="open_curve('호감도행동 ID:{{i+1}}', 'i_feed_self_chars,{{i}}')">{{statistics.i_feed_self_chars[i]}}</a></td>
                  {% endfor %}
                  <td colspan="{{12-statistics.i_feed_self_chars|length}}" style="background-color: #E0E0E0;"></td>
                  <td class="row0"><a href="#" onclick="open_curve('호감도행동', 'i_feed_self_chars,-1')">{{statistics.i_feed_self_chars|sum()}}</a></td>
                </tr>
                <tr>
                  <th class="sortable" scope="col">
                    <div class="text">호감도행동-친구(횟수)</div>
                  </th>
                  {% for i in range(statistics.i_feed_friend_chars|length) %}
                  <td class="row1"><a href="#" onclick="open_curve('호감도행동-친구 ID:{{i+1}}', 'i_feed_friend_chars,{{i}}')">{{statistics.i_feed_friend_chars[i]}}</a></td>
                  {% endfor %}
                  <td colspan="{{12-statistics.i_feed_friend_chars|length}}" style="background-color: #E0E0E0;"></td>
                  <td class="row1"><a href="#" onclick="open_curve('호감도행동-친구', 'i_feed_friend_chars,-1')">{{statistics.i_feed_friend_chars|sum()}}</a></td>
                </tr>
                <tr>
                  <th class="sortable" scope="col">
                    <div class="text">호감도버프(횟수)</div>
                  </th>
                  {% for i in range(statistics.i_buff|length) %}
                  <td class="row0"><a href="#" onclick="open_curve('호감도행동 ID:{{i+1}}', 'i_buff,{{i}}')">{{statistics.i_buff[i]}}</a></td>
                  {% endfor %}
                  <td colspan="{{12-statistics.i_buff|length}}" style="background-color: #E0E0E0;"></td>
                  <td class="row0"><a href="#" onclick="open_curve('호감도행동', 'i_buff,-1')">{{statistics.i_buff|sum()}}</a></td>
                </tr>
                <tr>
                  <th class="sortable" scope="col">
                    <div class="text">쿨타임초기화(횟수)</div>
                  </th>
                  <td class="row1"><a href="#" onclick="open_curve('쿨타임초기화', 'i_clear_cooltime')">{{statistics.i_clear_cooltime}}</a></td>
                  <td colspan="{{12-1}}" style="background-color: #E0E0E0;"></td>
                  <td class="row1"><a href="#" onclick="open_curve('쿨타임초기화', 'i_clear_cooltime')">{{statistics.i_clear_cooltime}}</a></td>
                </tr>
                <tr>
                  <td scope="col" rowspan="4" style="vertical-align: middle;"><b>기타</b></td>
                  <th class="sortable" scope="col">
                    <div class="text">아이템 가차(횟수)</div>
                  </th>
                  <td class="row0"><a href="#" onclick="open_curve('아이템 가차', 'i_gacha_item')">{{statistics.i_gacha_item}}</a></td>
                  <td colspan="{{12-1}}" style="background-color: #E0E0E0;"></td>
                  <td class="row0"><a href="#" onclick="open_curve('아이템 가차', 'i_gacha_item')">{{statistics.i_gacha_item}}</a></td>
                </tr>
                <tr>
                  <th class="sortable" scope="col">
                    <div class="text">일일포인트 가차(포인트)</div>
                  </th>
                  <td class="row1"><a href="#" onclick="open_curve('일일포인트 가차', 'i_use_dpoint')">{{statistics.i_use_dpoint}}</a></td>
                  <td colspan="{{12-1}}" style="background-color: #E0E0E0;"></td>
                  <td class="row1"><a href="#" onclick="open_curve('일일포인트 가차', 'i_use_dpoint')">{{statistics.i_use_dpoint}}</a></td>
                </tr>
                <tr>
                  <th class="sortable" scope="col">
                    <div class="text">이어하기(횟수)</div>
                  </th>
                  <td class="row0"><a href="#" onclick="open_curve('이어하기', 'i_continue')">{{statistics.i_continue}}</a></td>
                  <td colspan="{{12-1}}" style="background-color: #E0E0E0;"></td>
                  <td class="row0"><a href="#" onclick="open_curve('이어하기', 'i_continue')">{{statistics.i_continue}}</a></td>
                </tr>
                <tr>
                  <th class="sortable" scope="col">
                    <div class="text">복숭아/코인/당근/캐릭터 보상</div>
                  </th>
                  {% for i in range(statistics.i_rewards|length) %}
                  <td class="row1"><a href="#" onclick="open_curve('복숭아/코인/당근/캐릭터 보상 ID:{{i+1}}', 'i_rewards,{{i}}')">{{statistics.i_rewards[i]}}</a></td>
                  {% endfor %}
                  <td colspan="{{12-statistics.i_rewards|length}}" style="background-color: #E0E0E0;"></td>
                  <td class="row1"><a href="#" onclick="open_curve('복숭아/코인/당근/캐릭터 보상', 'i_rewards,-1')">{{statistics.i_rewards|sum()}}</a></td>
                </tr>
                {% for items in statistics.i_use_items %}
                <tr>
                  {% if loop.index==1 %}
                  	<td scope="col" rowspan="{{statistics.i_use_items|length}}" style="vertical-align: middle;"><b>아이템</b></td>
                  {% endif %}
                  <th class="sortable" scope="col">
                    <div class="text">게임{{loop.index-1}} 아이템사용(횟수)</div>
                  </th>
                  <td class="row{{(loop.index-1) % 2}}"><a href="#" onclick="open_curve('게임{{loop.index-1}} 아이템사용 ID : 1', 'i_use_items[{{loop.index-1}}].item0')">{{items.item0}}</a></td>
                  <td class="row{{(loop.index-1) % 2}}"><a href="#" onclick="open_curve('게임{{loop.index-1}} 아이템사용 ID : 2', 'i_use_items[{{loop.index-1}}].item1')">{{items.item1}}</a></td>
                  <td class="row{{(loop.index-1) % 2}}"><a href="#" onclick="open_curve('게임{{loop.index-1}} 아이템사용 ID : 3', 'i_use_items[{{loop.index-1}}].item2')">{{items.item2}}</a></td>
                  <td class="row{{(loop.index-1) % 2}}"><a href="#" onclick="open_curve('게임{{loop.index-1}} 아이템사용 ID : 4', 'i_use_items[{{loop.index-1}}].item3')">{{items.item3}}</a></td>
                  <td colspan="{{12-4}}" style="background-color: #E0E0E0;"></td>
                  <td class="row{{(loop.index-1) % 2}}"><a href="#" onclick="open_curve('게임{{loop.index-1}} 아이템사용', 'i_use_items[{{loop.index-1}}],-1')">{{items.item0+items.item1+items.item2+items.item3}}</a></td>
                </tr>
                {% endfor %}
              </thead>
            </table>
          </div>
      </form>
      <!-- END Content -->
    </div>
  </div>
</div>
<br>
<br>
<br>
<!-- END Container -->
{% include '/templates/cs_footer.html' %}